package main;

import userimage.BadEditor;

import java.awt.*;
import java.awt.geom.Rectangle2D;
import java.io.FileNotFoundException;

import static global.ProjectData.*;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        //获取系统等宽字体
        GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
        String[] fontNames = e.getAvailableFontFamilyNames();
        for (String fontName : fontNames) {
            Rectangle2D ib = theme.editorfont.getStringBounds("i", theme.textrender);
            Rectangle2D mb = theme.editorfont.getStringBounds("m", theme.textrender);
            if (ib.getWidth() == mb.getWidth()) {
                mono_fonts.add(fontName);
            }
        }
        //启动编辑器
        new BadEditor();

    }
}
